﻿using Model.Dto;
using Model.Entity;
using Model.Request;
using SqlSugar;

namespace TemplateInterfaceDao
{
    /// <summary>
    /// 用户信息
    /// </summary>
    public interface IUsersDao
    {
        /// <summary>        
        /// 获取用户信息
        /// </summary>        
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        Task<Users> GetUser(string username, string password);

        /// <summary>
        /// 根据查询条件获取用户列表
        /// </summary>
        /// <param name="req">查询条件</param>
        /// <param name="isPage">是否分页(默认分页)</param>
        Task<(List<UserDto>, RefAsync<int>)> GetSearchUsers(GetSearchUsersRequest req, bool isPage = true);
    }
}
